package com.itnetwork.DaoImp;

import javax.annotation.Resource;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.stereotype.Component;

import com.itnetwork.Entity.Admin;
@Component("adminDaoImp")
public class AdminDaoImp {
	//private HibernateTemplate hibernateTemplate;
	private SessionFactory sessionFactory;
	
	public Admin getAdminnerInfo(int id)
	{
		//return (Admin)hibernateTemplate.get(Admin.class, id);
		Session session = sessionFactory.getCurrentSession();
		Admin admin = (Admin)session.get(Admin.class, id);
		return admin;
	}

	public SessionFactory getSessionFactory() {
		return sessionFactory;
	}
	@Resource(name="sessionFactory")
	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}


	
}
